<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<h3>상영 예정작</h3>
<hr align="left" width="150">
<center>
<table class="list">
	<tr align="center">
		<c:forEach var="soonVO" items="${requestScope.sListVo.showingList}" varStatus="status">
			<c:if test="${status.index%4==0 }">
			</tr>
			<tr>
			</c:if>
			<td>
			<table class="list">
				<tr align="center"><td><a href="${initParam.root }movie/movie_content.do?flag=1&movieNo=${soonVO.movieNo}">
				<img src="${initParam.root }${soonVO.posterPath }" width="150" height="200"></a></td></tr>
				<tr align="center"><td>${soonVO.title }</td></tr>
			</table>
			</td>
		</c:forEach>
	</tr>
	<tr align="center">
		<td colspan="4">
		<c:if test="${requestScope.sListVo.pagingBean.previousPageGroup}">
			 <a href="${initParam.root }movie/soonList.do?pageNo=${requestScope.sListVo.pagingBean.startPageOfPageGroup-1}">◀&nbsp;</a>
		 </c:if>
		 &nbsp;&nbsp;
		<c:forEach var="i" begin="${requestScope.sListVo.pagingBean.startPageOfPageGroup}" end="${requestScope.sListVo.pagingBean.endPageOfPageGroup}">
		 	<c:choose>
		 		<c:when test="${requestScope.sListVo.pagingBean.nowPage!=i}">
		 			<a href="${initParam.root }movie/soonList.do?pageNo=${i}">${i}</a>
		 		</c:when>
			 	<c:otherwise>
					${i}
				</c:otherwise>
			</c:choose>
		</c:forEach>	 
		&nbsp;&nbsp;
		<c:if test="${requestScope.dlistvo.pagingBean.nextPageGroup}">
			<a href="${initParam.root }movie/soonList.do?pageNo=${requestScope.sListVo.pagingBean.endPageOfPageGroup+1}"> ▶ </a>
		</c:if>	
		</td>
	</tr>
</table>
</center>